<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增文献')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-literature-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">文献标题：</label>
				<div class="col-sm-8">
					<input id="literatureTitle" name="literatureTitle" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">文献类目：</label>
				<div class="col-xs-8">
					<label th:each="literaturetype:${literaturetype}" class="check-box">
						<input name="literatureTypeId" type="radio" th:value="${literaturetype.typeId}" th:text="${literaturetype.typeName}" >
					</label>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">文献作者：</label>
				<div class="col-xs-8">
					<label th:each="author:${author}" class="check-box">
						<input name="literatureAuthorId" type="radio" th:value="${author.authorId}" th:text="${author.authorName}" >
					</label>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">文献内容：</label>
<!--				<div class="col-sm-8">-->
<!--					<input id="literatureContent" name="literatureContent" class="form-control" type="text">-->
<!--				</div>-->
				<div class="col-xs-10">
					<textarea id="literatureContent" name="literatureContent" autocomplete="off" maxlength="500" class="form-control" rows="10"></textarea>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">文献创建时间：</label>
				<div class="col-sm-8">
					<input type="text" class="time-input" id="literatureCreateTime" placeholder="文献创建时间" name="literatureCreateTime"/>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">文献状态/备注：</label>
				<div class="col-sm-8">
					<input id="literatureStatus" name="literatureStatus" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "lms/literature"
		$("#form-literature-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-literature-add').serialize());
	        }
	    }
	</script>
</body>
</html>
